package mop.exception;

/**
 * Exception when calling a method in an inappropriate way
 * @author MOP Team 7
 */
public class IllegalMethodCallException extends Throwable {
	/**
	 * Initializes an IllegalMethodCallException
	 * @param message	Message to give to the user
	 * @post message equals given message
	 * 	|this.message == message
	 */
	public IllegalMethodCallException(String message){ this.message = message; }
	
	
	/**
	 * Return a error message that can be used by the GUI
	 * 
	 * @return An error message describing the error
	 */
	public String toString()
	{
		StringBuffer sb = new StringBuffer();
		sb.append(message);
		sb.append("");
		return sb.toString();
	}
	
	
	/**
	 * Weird java demand
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * Error message
	 */
	private final String message;
}
